<template>
    <div>
        <h1>webpack结合vue使用组件和路由</h1>

        <mt-button type="default">default</mt-button>
        <mt-button type="primary">primary</mt-button>
        <mt-button type="danger" @click="show">danger</mt-button>
        <p></p>
        <a href="#/account">account</a>
        <a href="#/goodslist">goodslist</a>
        <router-view></router-view>

        
    </div>
    
</template>

<script>
import { Toast } from 'mint-ui';
export default{
    data (){
        return {
            msg:"msg",
            i:null,
        }
    },
    created () {
        this.show()
        setTimeout(() => {
            this.i.close()
        }, 3000);
    },
    methods: {
        show(){
            this.i = Toast({
                message: '数据获取中，请稍后',
                duration: -1,
                iconClass: 'glyphicon glyphicon-repeat',
                // className: 'myToast'
            });
        }
    },
}
</script>

<style>

</style>>
    
</style>